package com.china08.yxyapi.entity.es;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.Mapping;

import com.china08.yxyapi.entity.ElasticBaseEntity;

/**
 * 资源表
 * 
 * @author Json
 *
 */
@Document(indexName = "yxy_res", type = "resource")
@Mapping(mappingPath = "/mappings/yxy-res-resource-mappings.json")
public class ElasticYxyResResource extends ElasticBaseEntity {

    private static final long serialVersionUID = 1L;
    @Field
    private String shoolId;

    @Field
    private String schoolName;

    // 资源作者
    @Field
    private String author;

    // 上传者
    @Field
    private String uploaderId;

    // 上传人名
    @Field
    private String uploaderName;

    // 上传者学校id
    @Field
    private String uploaderSchoolId;

    // 上传者学校明天
    @Field
    private String uploaderSchoolName;

    // 资源简介
    @Field
    private String intro;

    // 标题
    @Field
    private String title;

    // 文件大小
    @Field
    private Integer fileSize = 0;

    // 文件扩展名
    @Field
    private String extension;

    @Field
    private String md5;

    // 下载量
    @Field
    private Long downloadCount = 0l;

    /**
     * 展示次数
     */
    @Field
    private Long pv = 0l;

    /**
     * 收藏次数
     */
    @Field
    private Long favoriteCount = 0l;

    /**
     * 是否删除标记，增加此标记，是因为标记为删除之后，可以进行删除撤销，回到上次状态<br>
     * 0:没有删除 -1： 只传了视频无其他内容,1已删除
     */
    @Field
    private Integer isDelete = 0;

    // 审核状态 0：待审核 1：已通过 2：未通过 3：已下架
    @Field
    private Integer status = 0;

    // 文件的状态信息 0初始上传， 1 转码中 ，2 转码成功 ，3 转码失败
    @Field
    private Integer convertStatus = 0;

    /**
     * 审核人id
     */
    @Field
    private String auditUserId;

    /**
     * 审核人名称
     */
    @Field
    private String auditUserName;

    /**
     * 审核人学校id，如果为教育局为教育局id
     */
    @Field
    private String auditSchoolId;

    // 审核人所在学校名称，如果是教育局为教育局名称
    @Field
    private String auditSchoolName;

    /**
     * 查看范围 0：私有 1：学校 2： 教育云
     */
    @Field
    private Integer viewScope = 2;

    /**
     * 是否云校显示 1：在云校显示， 0： 不在云校显示
     */
    @Field
    private Integer isYxView = 1;

    /**
     * 文件路径
     */
    @Field
    private String location;

    // 0: 非云校资源 1 云校资源
    @Field
    private Integer isYxYunRes = 1;

    /**
     * 资源所属 ：省代码
     */
    @Field
    private String provinceCode;
    /**
     * 资源所属 ：市代码
     */
    @Field
    private String cityCode;

    /**
     * 资源所属 ：地区代码
     */
    @Field
    private String districtCode;

    // 评分
    @Field
    private float mark = 0f;

    // 上传时间
    @Field
    private Date uploadTime = new Date();

    @Field
    private String subjectId;

    @Field
    private String subjectName;

    // 版本可以变
    @Field
    private String versionId;

    @Field
    private String versionName;

    /**
     * 学段id
     */
    @Field
    private String phaseId;

    /**
     * 学段名称
     */
    @Field
    private String phaseName;

    // 多个
    /**
     * 学期id
     */
    @Field
    private String semesterId;

    /**
     * 学期名称，一年级上册，必修，选修
     */
    @Field
    private String semesterName;

    // 目录多个
    /**
     * 挂载的目录节点id
     */
    @Field
    private String bookContentId;

    /**
     * 挂载的目录节点名
     */
    @Field
    private String bookContentName;

    /**
     * 挂载的父节点id,逗号隔开，多个父节点
     */
    @Field
    private String bookContentPid;

    /**
     * 挂载的父节点名称。
     */
    @Field
    private String bookContentPname;

    // 多个
    @Field
    private String bookId;

    @Field
    private String typeId;

    @Field
    private String typeName;

    @Field
    private String formatId;

    @Field
    private String formatName;

    @Field
    private String remark;

    @Field
    private List<String> pidList = new ArrayList<String>();

    @Field
    private List<String> areaCodeList = new ArrayList<>();

    @Field
    private String cover;
    /** 视频文件时长 */
    @Field
    private Integer duration;

    // 微课有用的字段
    /** 学段 */
    @Field
    private String stage;

    @Field
    private String stageName;

    /** 学科 */
    @Field
    private String weikeSubject;
    /** 学科 */
    @Field
    private String weikeSubjectName;

    // 微课对应的知识点
    @Field
    private List<Integer> knowIds = new ArrayList<>();

    // 知识点名称
    @Field
    private List<String> knowNames = new ArrayList<>();

    // 知识点一级目录id
    @Field
    private List<String> knowOneLevelIds = new ArrayList<>();

    // 知识点一级目录名称
    @Field
    private List<String> knowOneLevelNames = new ArrayList<>();

    // 知识点二级目录id
    @Field
    private List<String> knowTwoLevelIds = new ArrayList<>();

    // 知识点二级目录名称
    @Field
    private List<String> knowTwoLevelNames = new ArrayList<>();

    // 1正常 0删除
    @Field
    @Deprecated
    private Integer weiKeStatus = 1;

    // 多个情况下 加的字段
    // 多个
    @Field
    private List<String> bookIdList = new ArrayList<>();
    // 学段
    @Field
    private List<String> phaseIdList = new ArrayList<String>();

    /**
     * 学段名称
     */
    @Field
    private List<String> phaseNameList = new ArrayList<String>();

    // 科目
    @Field
    private List<String> subjectIdList = new ArrayList<>();

    @Field
    private List<String> subjectNameList = new ArrayList<>();

    // 版本

    @Field
    private List<String> versionIdList = new ArrayList<>();

    @Field
    private List<String> versionNameList = new ArrayList<>();

    // 学期
    @Field
    private List<String> semesterIdList = new ArrayList<>();

    @Field
    private List<String> semesterNameList = new ArrayList<>();
    // 目录

    /**
     * 挂载的目录节点id
     */
    @Field
    private List<String> bookContentIdList = new ArrayList<>();

    /**
     * 挂载的目录节点名
     */
    @Field
    private List<String> bookContentNameList = new ArrayList<>();

    /**
     * 是否是vip
     */
    @Field
    private Boolean isVip = false;
    /**
     * 微课来源
     */
    @Field
    private String source;

    // 区域精品 0 否 1是
    @Field
    private Integer isHighQualityQy = 0;

    // 云校精品 0否 1是
    @Field
    private Integer isHighQualityYx = 0;

    public String getShoolId() {
        return shoolId;
    }

    public void setShoolId(String shoolId) {
        this.shoolId = shoolId;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getUploaderId() {
        return uploaderId;
    }

    public void setUploaderId(String uploaderId) {
        this.uploaderId = uploaderId;
    }

    public String getUploaderName() {
        return uploaderName;
    }

    public void setUploaderName(String uploaderName) {
        this.uploaderName = uploaderName;
    }

    public String getUploaderSchoolId() {
        return uploaderSchoolId;
    }

    public void setUploaderSchoolId(String uploaderSchoolId) {
        this.uploaderSchoolId = uploaderSchoolId;
    }

    public String getUploaderSchoolName() {
        return uploaderSchoolName;
    }

    public void setUploaderSchoolName(String uploaderSchoolName) {
        this.uploaderSchoolName = uploaderSchoolName;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getFileSize() {
        return fileSize;
    }

    public void setFileSize(Integer fileSize) {
        this.fileSize = fileSize;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public Long getDownloadCount() {
        return downloadCount;
    }

    public void setDownloadCount(Long downloadCount) {
        this.downloadCount = downloadCount;
    }

    public Long getPv() {
        return pv;
    }

    public void setPv(Long pv) {
        this.pv = pv;
    }

    public Long getFavoriteCount() {
        return favoriteCount;
    }

    public void setFavoriteCount(Long favoriteCount) {
        this.favoriteCount = favoriteCount;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getConvertStatus() {
        return convertStatus;
    }

    public void setConvertStatus(Integer convertStatus) {
        this.convertStatus = convertStatus;
    }

    public String getAuditUserId() {
        return auditUserId;
    }

    public void setAuditUserId(String auditUserId) {
        this.auditUserId = auditUserId;
    }

    public String getAuditUserName() {
        return auditUserName;
    }

    public void setAuditUserName(String auditUserName) {
        this.auditUserName = auditUserName;
    }

    public String getAuditSchoolId() {
        return auditSchoolId;
    }

    public void setAuditSchoolId(String auditSchoolId) {
        this.auditSchoolId = auditSchoolId;
    }

    public String getAuditSchoolName() {
        return auditSchoolName;
    }

    public void setAuditSchoolName(String auditSchoolName) {
        this.auditSchoolName = auditSchoolName;
    }

    public Integer getViewScope() {
        return viewScope;
    }

    public void setViewScope(Integer viewScope) {
        this.viewScope = viewScope;
    }

    public Integer getIsYxView() {
        return isYxView;
    }

    public void setIsYxView(Integer isYxView) {
        this.isYxView = isYxView;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public Integer getIsYxYunRes() {
        return isYxYunRes;
    }

    public void setIsYxYunRes(Integer isYxYunRes) {
        this.isYxYunRes = isYxYunRes;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getDistrictCode() {
        return districtCode;
    }

    public void setDistrictCode(String districtCode) {
        this.districtCode = districtCode;
    }

    public float getMark() {
        return mark;
    }

    public void setMark(float mark) {
        this.mark = mark;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public String getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(String subjectId) {
        this.subjectId = subjectId;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getVersionId() {
        return versionId;
    }

    public void setVersionId(String versionId) {
        this.versionId = versionId;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public String getPhaseId() {
        return phaseId;
    }

    public void setPhaseId(String phaseId) {
        this.phaseId = phaseId;
    }

    public String getPhaseName() {
        return phaseName;
    }

    public void setPhaseName(String phaseName) {
        this.phaseName = phaseName;
    }

    public String getSemesterId() {
        return semesterId;
    }

    public void setSemesterId(String semesterId) {
        this.semesterId = semesterId;
    }

    public String getSemesterName() {
        return semesterName;
    }

    public void setSemesterName(String semesterName) {
        this.semesterName = semesterName;
    }

    public String getBookContentId() {
        return bookContentId;
    }

    public void setBookContentId(String bookContentId) {
        this.bookContentId = bookContentId;
    }

    public String getBookContentName() {
        return bookContentName;
    }

    public void setBookContentName(String bookContentName) {
        this.bookContentName = bookContentName;
    }

    public String getBookContentPid() {
        return bookContentPid;
    }

    public void setBookContentPid(String bookContentPid) {
        this.bookContentPid = bookContentPid;
    }

    public String getBookContentPname() {
        return bookContentPname;
    }

    public void setBookContentPname(String bookContentPname) {
        this.bookContentPname = bookContentPname;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getFormatId() {
        return formatId;
    }

    public void setFormatId(String formatId) {
        this.formatId = formatId;
    }

    public String getFormatName() {
        return formatName;
    }

    public void setFormatName(String formatName) {
        this.formatName = formatName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<String> getPidList() {
        return pidList;
    }

    public void setPidList(List<String> pidList) {
        this.pidList = pidList;
    }

    public List<String> getAreaCodeList() {
        return areaCodeList;
    }

    public void setAreaCodeList(List<String> areaCodeList) {
        this.areaCodeList = areaCodeList;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getStage() {
        return stage;
    }

    public void setStage(String stage) {
        this.stage = stage;
    }

    public String getStageName() {
        return stageName;
    }

    public void setStageName(String stageName) {
        this.stageName = stageName;
    }

    public String getWeikeSubject() {
        return weikeSubject;
    }

    public void setWeikeSubject(String weikeSubject) {
        this.weikeSubject = weikeSubject;
    }

    public String getWeikeSubjectName() {
        return weikeSubjectName;
    }

    public void setWeikeSubjectName(String weikeSubjectName) {
        this.weikeSubjectName = weikeSubjectName;
    }

    public List<Integer> getKnowIds() {
        return knowIds;
    }

    public void setKnowIds(List<Integer> knowIds) {
        this.knowIds = knowIds;
    }

    public List<String> getKnowNames() {
        return knowNames;
    }

    public void setKnowNames(List<String> knowNames) {
        this.knowNames = knowNames;
    }

    public List<String> getKnowOneLevelIds() {
        return knowOneLevelIds;
    }

    public void setKnowOneLevelIds(List<String> knowOneLevelIds) {
        this.knowOneLevelIds = knowOneLevelIds;
    }

    public List<String> getKnowOneLevelNames() {
        return knowOneLevelNames;
    }

    public void setKnowOneLevelNames(List<String> knowOneLevelNames) {
        this.knowOneLevelNames = knowOneLevelNames;
    }

    public List<String> getKnowTwoLevelIds() {
        return knowTwoLevelIds;
    }

    public void setKnowTwoLevelIds(List<String> knowTwoLevelIds) {
        this.knowTwoLevelIds = knowTwoLevelIds;
    }

    public List<String> getKnowTwoLevelNames() {
        return knowTwoLevelNames;
    }

    public void setKnowTwoLevelNames(List<String> knowTwoLevelNames) {
        this.knowTwoLevelNames = knowTwoLevelNames;
    }

    public Integer getWeiKeStatus() {
        return weiKeStatus;
    }

    public void setWeiKeStatus(Integer weiKeStatus) {
        this.weiKeStatus = weiKeStatus;
    }

    public List<String> getBookIdList() {
        return bookIdList;
    }

    public void setBookIdList(List<String> bookIdList) {
        this.bookIdList = bookIdList;
    }

    public List<String> getPhaseIdList() {
        return phaseIdList;
    }

    public void setPhaseIdList(List<String> phaseIdList) {
        this.phaseIdList = phaseIdList;
    }

    public List<String> getPhaseNameList() {
        return phaseNameList;
    }

    public void setPhaseNameList(List<String> phaseNameList) {
        this.phaseNameList = phaseNameList;
    }

    public List<String> getSubjectIdList() {
        return subjectIdList;
    }

    public void setSubjectIdList(List<String> subjectIdList) {
        this.subjectIdList = subjectIdList;
    }

    public List<String> getSubjectNameList() {
        return subjectNameList;
    }

    public void setSubjectNameList(List<String> subjectNameList) {
        this.subjectNameList = subjectNameList;
    }

    public List<String> getVersionIdList() {
        return versionIdList;
    }

    public void setVersionIdList(List<String> versionIdList) {
        this.versionIdList = versionIdList;
    }

    public List<String> getVersionNameList() {
        return versionNameList;
    }

    public void setVersionNameList(List<String> versionNameList) {
        this.versionNameList = versionNameList;
    }

    public List<String> getSemesterIdList() {
        return semesterIdList;
    }

    public void setSemesterIdList(List<String> semesterIdList) {
        this.semesterIdList = semesterIdList;
    }

    public List<String> getSemesterNameList() {
        return semesterNameList;
    }

    public void setSemesterNameList(List<String> semesterNameList) {
        this.semesterNameList = semesterNameList;
    }

    public List<String> getBookContentIdList() {
        return bookContentIdList;
    }

    public void setBookContentIdList(List<String> bookContentIdList) {
        this.bookContentIdList = bookContentIdList;
    }

    public List<String> getBookContentNameList() {
        return bookContentNameList;
    }

    public void setBookContentNameList(List<String> bookContentNameList) {
        this.bookContentNameList = bookContentNameList;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public Integer getIsHighQualityQy() {
        return isHighQualityQy;
    }

    public void setIsHighQualityQy(Integer isHighQualityQy) {
        this.isHighQualityQy = isHighQualityQy;
    }

    public Integer getIsHighQualityYx() {
        return isHighQualityYx;
    }

    public void setIsHighQualityYx(Integer isHighQualityYx) {
        this.isHighQualityYx = isHighQualityYx;
    }

    public Boolean getIsVip() {
        return isVip;
    }

    public void setIsVip(Boolean isVip) {
        this.isVip = isVip;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }
}
